package com.wan.task;

import com.wan.commonsdk.HttpUtils;
import com.wan.commonsdk.PayInfo;
import com.wan.taskListener.PayOrderYHQTaskListener;

import android.os.AsyncTask;

public class PayOrderidTask extends AsyncTask{
	private PayInfo payinfo;
	private PayOrderYHQTaskListener yhqListener;
	private String orderid;
	
	public PayOrderidTask(PayInfo payinfo) {
		this.payinfo = payinfo;
	}
	
	public void setYhqListener(PayOrderYHQTaskListener yhqListener) {
		this.yhqListener = yhqListener;
	}
	@Override
	protected Object doInBackground(Object... params) {
		
		if(payinfo !=null){
			orderid = HttpUtils.HttpGetOrder(payinfo);
		}
		return null;
	}
	
	@Override
	protected void onPostExecute(Object result) {
		// TODO Auto-generated method stub
		yhqListener.payOrderid(payinfo,orderid);
	}
}
